using System;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
using System.Collections;
using System.Collections.Generic;

/// <summary>
/// Datatypes used for the Facebook application
/// </summary>
namespace AjaxNinja.Types
{
    public interface IFacebookEntity
    {
        void Fill(SqlDataReader reader);
    }

    public class MadMessage : IFacebookEntity
    {
        private string _msg;
        public string msg { get { return this._msg; } set { this._msg = value; } }

        private int _userID;
        public int userID { get { return this._userID; } set { this._userID = value; } }

        private int _storyID;
        public int storyID { get { return this._storyID; } set { this._storyID = value; } }

        private DateTime _timeStamp;
        public DateTime timeStamp { get { return this._timeStamp; } set { this._timeStamp = value; } }

        public void Fill(SqlDataReader reader)
        {
            this._storyID = (int)reader["StoryID"];
            this._msg = (string)reader["MadText"];
            this._timeStamp = (DateTime)reader["EntryTime"];
        }
    }

    public class AppUser : IFacebookEntity
    {
        private int _userID;
        public int userID { get { return this._userID; } set { this._userID = value; } }

        public void Fill(SqlDataReader reader)
        {
            this._userID = (int)reader["UserID"];
        }
    }
}